<%@ page language="java" import="java.util.*" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@include file="/inc/taglibs.jsp" %>
<script>
$(function(){
	var $pq=$("#protectQestion");
	for(var i=0;i<protectQestion.length;i++){
		$pq.append("<option value='"+i+"'>"+protectQestion[i]+"</option>");
	}
	var $gender=$("#sex");
	var ff=$gender.attr("value");
	if(ff==""){
		ff=0;
	}
	for(var i=0;i<gender.length;i++){
		$gender.append("<label><input type='radio' name='sex' value='"+i+"' "+(i==ff?"checked='checked'":"")+">"+gender[i]+"</label>&nbsp;&nbsp;");
	}
	initQueryForm();
});
function doevent(msg){
	showTip(msg.msg,null,1);
}
</script>
 <%--开始 --%>
   <div id="form_div" style="height:350px;">
      <form action="update" onsubmit="return ajaxSubmit(this,doevent);">
      	<input type="hidden" name="id" value="${user.id }">
       	<ul>
       		<li><div class="fieldtitle">姓氏:</div><div class="field"><input type="text" name="firstname"id="firstname" value="${user.firstname}"></div><div class="fieldmsg" style="display:none;">输入姓氏。</div></li>
       		<li><div class="fieldtitle">名字:</div><div class="field"><input type="text" name="lastname"id="lastname" value="${user.lastname }"></div><div class="fieldmsg" style="display:none;">输入名字。</div></li>
       		<li><div class="fieldtitle">性别:</div><div class="field"><div name="sex"id="sex" value="${user.sex }"></div></div><div class="fieldmsg" style="display:none;"></div></li>
       		<li><div class="fieldtitle">密码保护问题:</div><div class="field"><select name="protectQestion"id="protectQestion" val="${user.protectQestion }"></select></div><div class="fieldmsg">选择问题类型。</div></li>
       		<li><div class="fieldtitle">问题答案:</div><div class="field"><input type="text" name="protectAnswer"id="protectAnswer" value="${user.protectAnswer }"></div><div class="fieldmsg">输入对应的答案。</div></li>
       		<li><div class="fieldtitle">手机号码:</div><div class="field"><input type="text" name="phone"id="phone" value="${user.phone}"></div><div class="fieldmsg">输入您常用的手机号码。</div></li>
       		<li><div class="fieldtitle">Email:</div><div class="field"><input type="text" name="email"id="email" value="${user.email}"></div><div class="fieldmsg">输入您常用的电子邮箱。</div></li>
       		<li><div class="fieldtitle">&nbsp;</div><div class="field"><button type="submit">保存修改</button></div></li>
       	</ul>
       </form>
    </div>
<%--结束 --%>